<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head> 
    
    <title>添加联系人</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

 <link rel="stylesheet" href="message/css/message_css.css" type="text/css"></link>
 <script type="text/javascript" src="message/js/WebCalendar.js"></script>
  <script type="text/javascript" src="js/javascript.js"></script>
 
 <script type="text/javascript">
 	function addOrUpdate(){
	 	if(confirm("是否更新原有数据？")){
	 		document.addOrUpdate.submit();
	 	} 		
 	}
 </script>
</head>
  
  <body>
  <div class="top">
    			&nbsp;<img src="images/index_32.gif"></img>&nbsp;添加联系人
    	</div>
    <form action="addPersonal" method="post">      	
<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
   <td class="td_01">&nbsp;姓&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
    <td class="td_01"><input name="addressBook.name" type="text" id="name" value="<s:property value='addressBook.name'/>" onfocus="noneDiv('nameId')" onblur="validateName()"/>
    	<div id="nameId"></div>
    </td>
    <td class="td_01">&nbsp;通讯组：</td>
    <td class="td_01">
    	<select name="addressBook.addressGroup.addressGroupId" id="select_p">
    		<s:iterator value="list">
    			<option value="<s:property value='addressGroupId' />"><s:property value="addressGroupName" /></option>
    		</s:iterator>
    	</select>
    </td>
   
  </tr>
  <tr>
    <td class="td_01">&nbsp;性&nbsp;&nbsp;&nbsp;&nbsp;别：</td>
    <td class="td_01">
    	<select name="addressBook.sex" id="select_p">
    			<option value="男">男</option>
    			<option value="女">女</option>
    	</select>
	</td>
	<td class="td_01">&nbsp;民&nbsp;&nbsp;&nbsp;&nbsp;族：</td>
    <td class="td_01">
    	<select name="addressBook.nation" id="select_p">
    		<option value="汉族">汉族</option>
    		<option value="藏族">藏族</option>
    		<option value="苗族">苗族</option>
    		<option value="羌族">羌族</option>
    		<option value="鲜卑族">鲜卑族</option>
    		<option value="壮族 ">壮族</option>
    		<option value="维吾尔族">维吾尔族</option>
    		<option value="白族">白族</option>    		
    	</select>
	</td>
   
  </tr>
  <tr>
    <td class="td_01">&nbsp;婚姻状况：</td>
    <td class="td_01">
		<select name="addressBook.ismarriage" id="select_p">
				<option value="是">已婚</option>
    			<option value="否">未婚</option> 	
    		
    	</select>
	</td>
	 <td class="td_01">&nbsp;生&nbsp;&nbsp;&nbsp;&nbsp;日：</td>
    <td class="td_01">
    	<input type="text" name="addressBook.birthday" readonly="readonly" id="birthId" onclick="selectDate(birthId,'yy-MM-dd')">
    	<div id="birthIds"></div>
    </td>
    
  </tr>
  <tr>
     <td class="td_01">&nbsp;移动电话：</td>
    <td class="td_01"><input type="text" id="mobile" name="addressBook.mobile" onfocus="noneDiv('mobileId')" onblur="validateMobile()">
    	<div id="mobileId"></div>
    </td>
    <td class="td_01">&nbsp;工作电话：</td>
    <td class="td_01"><input type="text" id="offTel" name="addressBook.officePhone" onfocus="noneDiv('offTelId')" onblur="validateTel()">
    	<div id="offTelId"></div>
    </td>
  </tr>
  <tr>   
    <td class="td_01">&nbsp;Q&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Q：</td>
    <td class="td_01"><input type="text" id="qq" name="addressBook.qq" onfocus="noneDiv('qqId')" onblur="validateQQ()">
    <div id="qqId"></div></td>
    <td class="td_01">&nbsp;电子邮箱：</td>
    <td class="td_01"><input type="text" id="email" name="addressBook.email" onfocus="noneDiv('emailId')" onblur="validateEmail()">
    	<div id="emailId"></div>
    </td>
  </tr>
  <tr>
 
   <td class="td_01">&nbsp;家庭住址：</td>
    <td colspan="3" class="td_01"><input type="text" id="address" name="addressBook.address" onfocus="noneDiv('addressId')" onblur="validateAddress()">
    	<div id="addressId"></div>
    </td>
    
 </tr>
  <tr>   
    <td colspan="4" align="center" class="td_01">
    	<input type="submit" value="添加" class="buttonface02" onclick="return validate()">&nbsp;&nbsp;
    	<input type="reset" value="重置" class="buttonface02">&nbsp;&nbsp;
    	<input type="button" value="关闭" onclick="location.href='pageByGroupId'" class="buttonface02">&nbsp;&nbsp;
    </td>    
  </tr>
</table>
    		
    </form>
  </body>
  
</html>
